#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:8_most_frequent_char.py
# author:张世航
# datetime:2024/10/31 19:24
# software: PyCharm
"""
this is function  description 
"""
# import module your need

# 8  请用Python定义一个函数，给定一个字符串，找出该字符串中出现次数最多的那个字符，并打印出该字符及其出现的次数。
#  例如，输入 aaaabbc，输出：a:4

def most_frequent_char(s):
    from collections import Counter
    count = Counter(s)
    most_common = count.most_common(1)[0]
    print(f"{most_common[0]}: {most_common[1]}")

# 用户输入
user_string = input("请输入一个字符串：")
most_frequent_char(user_string)